<HTML>
<HEAD>
<TITLE>Bug Squasher 3.6</TITLE>
<SCRIPT>
function checkVals() {
  var r=document.vars.rows.value;
  var c=document.vars.cols.value;
  var b=document.vars.bugs.value;
  if(r<9 || r>16) {
    alert("Rows must be between 9 and 16.");
    document.vars.rows.focus();
    return false;
  }
  if(c<9 || c>30) {
    alert("Columns must be between 9 and 30.");
    document.vars.cols.focus();
    return false;
  }
  if(b<10 || b>(r-1)*(c-1)) {
    alert("Bugs must be between 10 and "+(r-1)*(c-1)+".");
    document.vars.bugs.focus();
    return false;
  }
  if((r==9 && c==9 && b==10) || (r==16 && c==16 && b==40) || (r==16 && c==30 && b==99))
    document.vars.custom_game.value="false";
  else
    document.vars.custom_game.value="true";
  return true;
}

function setVals(r,c,b) {
  document.vars.rows.value=r;
  document.vars.cols.value=c;
  document.vars.bugs.value=b;
}
function play() {
  var rows=document.vars.rows.value;
  var cols=document.vars.cols.value;
  var bugs=document.vars.bugs.value;
  var custom=document.vars.custom_game.value;
  var url=document.location.href;
  var location=url.substring(0,url.indexOf("bugsquasher"));
  document.location.href=location+"bugsquasher/bugsquasher.html?rows="+rows+"&cols="+cols+"&bugs="+bugs+"&custom="+custom+"&location="+location+"bugsquasher";
}
</SCRIPT>
</HEAD>
<BODY ALINK="blue" VLINK="blue">
<CENTER>
Bug Squasher is like the Windows Minesweeper game. Here are the <A HREF="help.html" TARGET="_new">instructions for Bug Squasher</A>.
<P>
Choose a level:<BR>
<A HREF="javascript:setVals(9,9,10);">Beginner</A><BR>
<A HREF="javascript:setVals(16,16,40);">Intermediate</A><BR>
<A HREF="javascript:setVals(16,30,99);">Expert</A>
<P>
<FORM NAME="vars">
<INPUT TYPE=HIDDEN NAME="custom_game" VALUE="false">
Rows: <INPUT TYPE=TEXT NAME="rows" VALUE="9" SIZE=2 MAXLENGTH=2>
Columns: <INPUT TYPE=TEXT NAME="cols" VALUE="9" SIZE=2 MAXLENGTH=2>
Bugs: <INPUT TYPE=TEXT NAME="bugs" VALUE="10" SIZE=3 MAXLENGTH=3>
<INPUT TYPE=BUTTON VALUE="Let's Play" onClick="if(checkVals())play();">
</FORM>
<P>
<A HREF="bugsquasher.zip">Download source code and images</A><BR>
<A HREF="knownbugs.txt">List of known bugs in the program</A>
<P>
Please email <A HREF="mailto:benshim@flash.net?subject=bugsquasher bug report">benshim@flash.net</A> if you find any other bugs. Thanks.
<P>
<FONT SIZE=2 COLOR="red">Game last updated 4/13/03</FONT>
<P>
&nbsp;
<P>
For more cool scripts, check out <A HREF="http://www.scriptsearch.com">ScriptSearch.com</A>.
</CENTER>
</BODY>
</HTML>
